import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JPanel;

public class MyCell extends JPanel {
	
	private static final long serialVersionUID = 1L;
	
	Color myColor;
	
	MyCell ( ) {
		this.myColor = Color.WHITE;
	} 

	public void setColor(Color color) {
		this.myColor = color;
	}
	
	public void paintComponent(Graphics g) {
		int width = this.getWidth();
		int height = this.getHeight();
		
		g.setColor(myColor);
		g.fillRect(0, 0, width, height);
		g.setColor(Color.BLACK);
		g.drawRect(0, 0, width, height);
	}
	
	public void doRefresh ( ) {
		paintComponent(this.getGraphics());
	}
}
